import { number } from 'echarts';
import request from '../utils/request';
const url = 'http://localhost:8080/subject';

export interface subjectItemData 
{
    subjectId : number;
    subjectType : string;
}

export const getCoachBySexOrAge = (sex: string, age1: number, age2: number) => {
    return request({
        url: url+'/getCoachBySexOrAge',
        method: 'post',
        params: { sex, age1, age2 }
    });
};
export const getAllCoach = () => {
    return request({
        url: url+'/getAllCoach',
        method: 'get',
    });
};
export const findByStudentID = (studentId : number) => {
    return request({
        url: url+`/findByStudentID/${studentId}`,
        method: 'get',
    });
};

export const findAllExam = () =>{
    return request({
        url: url+'/findAllExam',
        method: 'get',
    });
}

export const updateExam = () =>{
    return request({
        url: url+'/updateExam',
        method: 'post',
    });
}
